package org.iweb.html.impl.widget;

import org.iweb.html.api.AbstractWidget;
import org.iweb.html.impl.basic.A;
import org.iweb.html.impl.basic.Div;
import org.iweb.html.impl.basic.Ul;


public class Tab extends AbstractWidget{

	private static final long serialVersionUID = 7219946000917586829L;
	private Ul ul;
	
	public Tab() {
		ul=new Ul();
		append(ul);
	}
	
	@Override
	public String getScriptTag() {
		return "tabs";
	}
	
	public Tab addTab(String title,Div div){
		A a=new A(title);
		a.setHref("#"+div.getId());
		ul.addRow(a);
		append(ul);
		append(div);
		return this;
	}
	
}
